package com.zl.redisscheduler.core;


import java.util.Collection;
import java.util.concurrent.ConcurrentHashMap;

/**
 *
 *
 * @date 2021/4/7 17:33
 * @author Lizhong
 */
public class DefaultTaskManager extends ConcurrentHashMap<String, ScheduleMetadata> implements TaskManager {
    @Override
    public ScheduleMetadata putTask(String taskId, ScheduleMetadata runnable) {
        return super.put(taskId,runnable);
    }

    @Override
    public ScheduleMetadata getTask(String taskId) {
        return super.get(taskId);
    }

    @Override
    public Collection<ScheduleMetadata> getAllTask() {
        return super.values();
    }
}
